# 作者: 肖老师
# 2024年12月18日22时23分00秒
# xxxrlmk@163.com
def bsearch(arr, target):
    low = 0
    high = len(arr) - 1
    while low <= high:  # 要是小于等于
        mid = (low + high) // 2
        if target < arr[mid]:
            high = mid - 1
        elif target > arr[mid]:
            low = mid + 1
        else:
            return mid
    return -1


mylist = [13, 23, 24, 44, 46, 48, 57, 72, 79, 89]
print(bsearch(mylist, 46))
file = open()
file.write()
